﻿using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace OFX.Aggregator.Infrastructure
{
	[Serializable]
	public class Statement
	{
		[DebuggerBrowsable(DebuggerBrowsableState.Never)] private AccountInfo accountInfo = new AccountInfo();
		[DebuggerBrowsable(DebuggerBrowsableState.Never)] private StatementFlags flags = StatementFlags.None;

		[DebuggerBrowsable(DebuggerBrowsableState.Never)] private List<PaymentOriginator> paymentOriginators =
			new List<PaymentOriginator>();

		public AccountInfo Account
		{
			[DebuggerStepThrough]
			get { return this.accountInfo; }
			set { this.accountInfo = value; }
		}

		public StatementFlags Flags
		{
			[DebuggerStepThrough]
			get { return this.flags; }
			[DebuggerStepThrough]
			set { this.flags = value; }
		}

		public DateTime Date { get; set; }
		public DateTime DateStart { get; set; }
		public DateTime DateEnd { get; set; }
		public string Currency { get; set; }

		public List<PaymentOriginator> PaymentOriginators
		{
			[DebuggerStepThrough]
			get { return this.paymentOriginators; }
			set { this.paymentOriginators = value; }
		}
	}

	[Flags]
	[Serializable]
	public enum StatementFlags
	{
		None = 0,
		AccurateDate = 1
	}
}